# -*- coding: utf-8 -*-

from app.enum.base_enum import BaseEnum


class ListStatusEnum(BaseEnum):
    """
    上市状态枚举
    """
    LIST = 'L'
    DELIST = 'D'
    PAUSE_LIST = 'P'
    TEXT = {
        LIST: '上市',
        DELIST: '退市',
        PAUSE_LIST: '暂停上市',
    }


class IsHsEnum(BaseEnum):
    """
    是否沪深港通标的
    """
    NO = 'N'
    HU = 'H'
    SH = 'S'
    TEXT = {
        NO: '否',
        HU: '沪股通',
        SH: '深股通',
    }


class BoolIntEnum(BaseEnum):
    """
    布尔值枚举
    """
    TRUE = 1
    FALSE = 0
    TEXT = {
        TRUE: '是',
        FALSE: '否',
    }


class ExchangeEnum(BaseEnum):
    """
    交易所枚举
    """
    SSE = 'SSE'  # 上交所
    SZSE = 'SZSE'  # 深交所
    CFFEX = 'CFFEX'  # 中金所
    SHFE = 'SHFE'  # 上期所
    CZCE = 'CZCE'  # 郑商所
    DCE = 'DCE'  # 大商所
    INE = 'INE'  # 上能源
    TEXT = {
        SSE: '上交所',
        SZSE: '深交所',
        CFFEX: '中金所',
        SHFE: '上期所',
        CZCE: '郑商所',
        DCE: '大商所',
        INE: '上能源',
    }


class MarketEnum(BaseEnum):
    MSCI = 'MSCI'
    CSI = 'CSI'
    SSE = 'SSE'
    SZSE = 'SZSE'
    CICC = 'CICC'
    SW = 'SW'
    OTH = 'OTH'
    TEXT = {
        MSCI: 'MSCI指数',
        CSI: '中证指数',
        SSE: '上交所指数',
        SZSE: '深交所指数',
        CICC: '中金指数',
        SW: '申万指数',
        OTH: '其他指数',
    }
